public class Rectangle extends shape {
    double area(double a, double b) {
        return a * b;
    }

    double perimeter(double a, double b) {
        return 2 * (a + b);
    }

    String toString(double a, double b) {
        return "长宽分别为:" + String.valueOf(a) + ","
                + String.valueOf(b)
                + "的矩形面积为:" + String.valueOf(area(a, b))
                + "周长为:" + String.valueOf(perimeter(a, b));
    }
}
